import request from '@/utils/request'

/**
 * 支付模拟相关API
 */

// 模拟支付
export function simulatePayment(data) {
  return request({
    url: '/api/payment/simulate.do',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

// 检查支付状态
export function checkPaymentStatus(params) {
  return request({
    url: '/api/payment/status.do',
    method: 'get',
    params
  })
}

// 获取支付方式列表
export function getPaymentMethods() {
  return request({
    url: '/api/payment/methods.do',
    method: 'get'
  })
}

// 创建支付订单
export function createPaymentOrder(data) {
  return request({
    url: '/api/payment/createOrder.do',
    method: 'post',
    data
  })
}

// 支付回调处理
export function handlePaymentCallback(data) {
  return request({
    url: '/api/payment/callback.do',
    method: 'post',
    data
  })
}
